Repository navigation
fix(batch): raise a clear error for unsupported property types - #2264
steven-asearcy wants to merge 2 commits into
Conversation
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
|
I agree with the CLA |
816c588 to
c67bc5c
Compare
|
@dirkkul thanks, good catch on the list test. it was only hitting went with the conversion in this PR:
tests go through two things i noticed but left alone:
|
closes #2263
batch and
insert_manypassed types they don't handle straight into protobuf'sStruct.update, which fails withValueError: Unexpected type, and in a batch that takes every other object down with it.now Decimal and numpy numbers get converted before serialization (Decimal and numpy floats to float, numpy ints to int), in both the grpc path and
data.insert. converted values that end up NaN or inf raiseWeaviateInvalidInputError, and types that still can't be serialized raise the sameWeaviateInvalidInputErrorthatdata.insertalready did.Decimalis added toWeaviateField.tuples still work, they get turned into lists the same way
Structhandled them before.tests: unit tests through
_BatchGRPC.grpc_objectintest/collection/test_batch.py,stream()tests inmock_tests/test_batch.py, and integration tests inintegration/test_batch_v4.py.pytest test,pytest mock_testsand the batch and collection integration tests pass against 1.40.5 withci/start_weaviate.sh. pre-commit is clean on the changed files apart from pyright, which reports the same 226 errors on main.